#include "stdafx.h"
#include "./glWin.h"
#include "./glPainter.h"
#include "./glCanvas.h"
#include "./glPict.h"
#include "./glApp.h"

GLES::Void GLES::Winlet::draw( Painter* painter )
{
}

GLES::Winlet::~Winlet()
{
	
	SAFE_DELETE(_canvas);
	SAFE_DELETE(_painter);
}

GLES::Bool GLES::Winlet::createFrom( HWND hwnd,SizeI& size )
{
	E_Return(_canvas = new Canvas());
	E_Return(_canvas->createWinSurface(hwnd));
	E_Return(_painter = new Painter());
	E_Return(_painter->attachCanvas(_canvas));
	return true;
}